/* 移动端首页样式 */

/* 顶部横幅 */
.top-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 20px 30px;
    color: white;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.banner-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.banner-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.user-section {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.user-avatar-text {
    position: relative;
    z-index: 1;
}

.login-link {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Hero区域 */
.hero-section {
    background: white;
    border-radius: 20px;
    padding: 30px 24px;
    margin-top: -20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.hero-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.hero-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.start-quiz-btn {
    font-size: 16px;
    padding: 14px;
}

/* 快速统计 */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 区块标题 */
.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-left: 4px;
}

/* 功能特色列表 */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.feature-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* 分类列表 */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.category-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.category-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.category-content {
    flex: 1;
}

.category-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 6px 0;
}

.category-count {
    font-size: 11px;
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.category-arrow {
    font-size: 24px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* 页面包装器调整 */
.page-wrapper {
    background: var(--bg-secondary);
    padding-bottom: 80px;
}

/* 响应式调整 */
@media (max-width: 375px) {
    .hero-title {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .feature-icon {
        font-size: 36px;
    }
    
    .category-icon {
        font-size: 32px;
    }
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .top-banner {
        padding-top: max(20px, calc(env(safe-area-inset-top) + 20px));
    }
}

